interface Prototype {
    public Object Clone();
}

class Product implements Prototype {
    private int id;
    private String name;

    Product() {

    }

    Product(int id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public Object Clone() {
        Product object = new Product();
        object.id = this.id;
        object.name = this.name;
        return object;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }
}

class test {
    public static void main(String[] args) {
        Product p_old = new Product(26,"test");

        System.out.println("id: " + p_old.getId() + " name: " + p_old.getName());

        Product p_new = (Product)p_old.Clone();

        System.out.println("id: " + p_new.getId() + " name: " + p_new.getName());


    }
}